<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="x-ua-compatible" content="ie=7" />
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>后台管理</title>
        <link href="{:C('WEB_URL')}Public/admin/style/base.css" rel="stylesheet" type="text/css" />
        <link href="{:C('WEB_URL')}Public/admin/style/master.css" rel="stylesheet" type="text/css" />

        <script type="text/javascript" src="{:C('WEB_URL')}Public/admin/js/jquery1.9.1.js"></script>
        <script type="text/javascript" src="{:C('WEB_URL')}Public/admin/js/base.js"></script>
        <script type="text/javascript" src="{:C('WEB_URL')}Public/admin/js/drag.js"></script>
        <script type="text/javascript">
            $(function(){
                //设置容器高度
                if((navigator.userAgent.indexOf('MSIE') >= 0) && (navigator.userAgent.indexOf('Opera') < 0)){
                    $("#sidebar").height(window.screen.availHeight-window.screenTop);
                    $("#iframe_home").height($("#sidebar").height()-$("#header").height()-$("#footer").height()-20);
                }else if (navigator.userAgent.indexOf('Firefox') >= 0){
                    $("#sidebar").height(window.innerHeight);
                    $("#iframe_home").height($("#sidebar").height()-$("#header").height()-$("#footer").height()-20);
                }else if (navigator.userAgent.indexOf('Opera') >= 0){
                    $("#sidebar").height(window.innerHeight);
                    $("#iframe_home").height($("#sidebar").height()-$("#header").height()-$("#footer").height()-20);
                }else{
                    $("#sidebar").height(window.innerHeight);
                    $("#iframe_home").height($("#sidebar").height()-$("#header").height()-$("#footer").height()-20);
                }

                $("#edit_pwd > h4").drag("#edit_pwd", {
                    lockedR : false,
                    lockedX : false,
                    lockedY : false
                });
                
                $("#nav > li > a").click(function(e){
                    
                    $(this).parent("li").addClass("current").append("<b class='arrow'></b>").siblings("li").removeClass("current").find("b").remove(".arrow");
                    $("#iframe_home").attr("src",$(this).attr("href"));
                    return false;
                });
                
                $("#nav > li > ol > li > a").click(function(){
                    $(this).closest("#nav > li").addClass("current").append("<b class='arrow'></b>").siblings("li").removeClass("current").find("b").remove(".arrow");
                    $("#iframe_home").attr("src",$(this).attr("href"));
                    return false;
                })
                
                $("#nav > li > b.hover").bind("click",function(){
                    var ol=$(this).siblings("ol")
                    if(ol.is(":hidden")){
                        ol.show();
                    }else{
                        ol.hide();
                    }
                })
            })

            function pwd(){
                var str=$("#password").val();
                rel=/^[a-zA-Z0-9\u4e00-\u9fa5]{5,20}$/;

                if(!rel.test(str)){
                    alert("密码格式错误！");
                    return false;
                }else if(str!=$("#npassword").val()){
                    alert("确认密码错误！");
                    return false;
                }else{
                    $("#myform").submit();
                }
            }

        </script>
    </head>
    <body>
        <table width="100%" cellspacing="0">
            <tr>
                <td width="160px" valign="top">
                    <div id="sidebar">
                        <ul id="nav">
                        	<li class="current menu"><a href="{:C('Index/main')}" class=""><b class="icon3"></b>首页</a><b class="arrow"></b></li>
                            <li class="line"></li>
                            <!-- 
							  <li class="menu">
                                <a href="{:U('Order/hzOrder')}"><b class="icon5"></b>保养订单</a><b class="hover"></b>
                                <ol>
                                    <li><a href="{:U('Order/hzOrder')}">杭州订单</a></li>
                              		<li><a href="{:U('Order/shOrder')}">上海订单</a></li>
                              		<li><a href="{:U('Order/sendMsg')}">发送短信</a></li>
                                </ol>
                            </li>
                            <li class="menu">
                                <a href="{:U('Pj/index')}"><b class="icon5"></b>配件库</a><b class="hover"></b>
                                <ol>
                                    <li><a href="{:U('Pj/index')}">配件列表</a></li>
                                    <li><a href="{:U('Pj/edit')}">添加配件</a></li>
                                    <li><a href="{:U('Pj/pjType')}">配件分类</a></li>
                                    <li><a href="{:U('Order/summer')}">空调清洗</a></li>
                                </ol>
                            </li>
                            <li class="menu">
                                <a href="{:U('Auto/model')}"><b class="icon5"></b>汽车品牌</a><b class="hover"></b>
                                <ol>
                                    <li><a href="{:U('Auto/index')}">汽车品牌</a></li>
                                    <li><a href="{:U('Auto/model')}">车型列表</a></li>
                                    <li><a href="{:U('Auto/add_auto')}">添加车型</a></li>
                                </ol>
                            </li>
                            <li class="menu">
                                <a href="#"><b class="icon5"></b>门店管理</a><b class="hover"></b>
                                <ol>
                                    <li><a href="{:U('Auto/index')}">门店列表</a></li>
                                    <li><a href="{:U('Auto/modelList')}">工位管理</a></li>
                                    <li><a href="{:U('Auto/addModel')}">技工管理</a></li>
                                </ol>
                            </li> -->
                            <li class="menu">
                                <a href="javascript:void(0);"><b class="icon5"></b>商圈管理</a><b class="hover"></b>
                                <ol>
                                    <li><a href="{:U('Sq/index')}">商圈列表</a></li>
                                    <li><a href="{:U('Sq/edit')}">添加商圈</a></li>
                                </ol>
                            </li>
                            <li class="menu">
                                <a href="javascript:void(0);"><b class="icon5"></b>商场管理</a><b class="hover"></b>
                                <ol>
                                    <li><a href="{:U('Sc/index')}">商场列表</a></li>
                                    <li><a href="{:U('Sc/edit')}">添加商场</a></li>
                                </ol>
                            </li>
                            <li class="menu">
                                <a href="javascript:void(0);"><b class="icon5"></b>商家管理</a><b class="hover"></b>
                                <ol>
                                    <li><a href="{:U('Sj/index')}">商家列表</a></li>
                                    <li><a href="{:U('Sj/edit')}">添加商家</a></li>
                                    <li><a href="{:U('Sj/withdraw')}">商家提现</a></li>
                                     <li><a href="{:U('Sj/question')}">问题反馈</a></li>
                                       <li><a href="{:U('Sj/message')}">留言板</a></li>
                                    
                                </ol>
                            </li>
                            <li class="menu">
                                <a href="javascript:void(0);"><b class="icon5"></b>卡券管理</a><b class="hover"></b>
                                <ol>
                                    <li><a href="{:U('Cq/index')}">卡券列表</a></li>
<!--                                     <li><a href="{:U('Cq/edit')}">添加卡券</a></li>
 -->                                </ol>
                            </li>
                            <li class="menu">
                                <a href="javascript:void(0);"><b class="icon5"></b>活动管理</a><b class="hover"></b>
                                <ol>
                                    <li><a href="{:U('Service/index')}">活动列表</a></li>
                                    <li><a href="{:U('Service/edit')}">添加活动</a></li>
                                </ol>
                            </li>
                            <li class="line"></li>
                            <li class="menu"><a href="{:U('User/index')}"><b class="icon10"></b>会员</a></li>
                            <li class="line"></li>
                            <li class="menu"><a href="{:U('User/admin_index')}"><b class="icon13"></b>管理员</a></li>
                        </ul>

                    </div>
                </td>
                <td valign="top">
                    <div id="header">
                        <p class="fright">
                            欢迎您：{$_SESSION['username']}&nbsp;&nbsp;
                            <a href="javascript:myshow('#edit_pwd')" >修改密码</a>&nbsp;&nbsp;|
                            <a href="{:U('Index/logout')}">退出管理</a>
                        </p>
                        <p class="sitename">
                            <img src="{:C('WEB_URL')}/favicon.ico" width="20px" height="20px" id="favicon"/>
                            <a href="{:C('WEB_URL')/Admin}">后台管理</a>
                        </p>

                    </div>
                    <div id="desktop" style="height:100%;">
                        <iframe width="100%" frameborder="no" scrolling="auto" style="border:none;" src="{:U('/Admin/Index/main/')}" id="iframe_home"></iframe>
                        <include file="Public:footer" />
                    </div>
                </td>
            </tr>
        </table>
        <div id="edit_pwd" class="windows hide">
            <h4><a href="javascript:close('#edit_pwd')">关闭</a>修改密码</h4>
            <div>
                <form action="{:U('uploadpwd')}" method="post" id="myform">
                    <table class="form" cellspacing="0" style="border:0px;">
                        <tr>
                            <td class="tkey w80">原密码：</td>
                            <td><input type="password" name="opassword" id="opassword" class="inputText" /></td>
                        </tr>
                        <tr>
                            <td class="tkey">新密码：</td>
                            <td><input type="password" name="password" id="password" class="inputText" /></td>
                        </tr>
                        <tr>
                            <td class="tkey">确定新密码：</td>
                            <td><input type="password" name="npassword" id="npassword" class="inputText" /></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>
                                <button type="button" onclick="pwd()" class="btnOrange">确&nbsp;&nbsp;定</button>
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <script type="text/javascript">
        function shuaxin(){
        	location.href ='http://'+location.host+'/Admin/Index/index/';
        }
        </script>
    </body>
</html>
